<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  
  <title>OmegaT, the free translation memory tool</title>
  <meta name="generator" content="screem 0.10.2" />
  
  <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
  
  <meta name="keywords" content="translation memory, TM, computer-aided translation, computer-assisted translation, CAT, GPL, open source" />

  
<link rel="stylesheet" type="text/css" href="../../config/howto.css" />
</head>

<body>

<div id="container">
			
<div id="banner">

<h1>OmegaT</h1>

<p>The free (GPL) translation memory tool</p>

</div>

<div id="content">

<h2>OmegaT HowTo: <br/>Using Google Translate in OmegaT</h2>

<p>Besides the web page into which users can simply paste text for translation, Google Translate also provides an interface (API) which can be used by CAT tools to access the service. As of December 2011, Google has required payment from users for use of this service. This HowTo describes how to configure the function in OmegaT.</p>

<p>1. If you don't already have one, open an account with google.com.</p>

<p>2. <a href="http://code.google.com/apis/language/translate/v2/pricing.html">Follow this link to apply to Google</a> for the Google Translate API v2 key. Make sure that you have your credit card details handy. Google will generate your API key, a string with approximately 39 characters.</p>

<p>3. Assign the key to OmegaT's launch procedure as follows, depending upon whether you are using Windows, Mac, or launching OmegaT from the command line or by means of a script:</p>

<p><b>Windows users:</b></p>

<p>3.1. Locate the configuration file OmegaT.l4J.ini (the default location is C:\Program Files (x86)\OmegaT).</p>
<p>3.2. To edit this file, you may need Administrator mode, or to move it temporarily to a different location on your hard drive.</p>
<p>3.3. Open OmegaT.l4J.ini in a plain-text editor</p>
<p>3.4. Add the following line to the text in the file:</p>
-Dgoogle.api.key=XXXXXXXX </p>
<p>(where "XXXXXXXX" is the API key provided by Google).</p>
<p>3.5. Save OmegaT.l4J.ini (and if necessary, move it back to the OmegaT folder).</p>

<p><b>Mac users:</b></p>

<p>3.6 Right-click on OmegaT.app and select "Show Package Contents".</p>
<p>3.7 Right-click on the file Info.plist and select your preferred editor to open the file.</p>
<p>3.8. Find the lines:</p>
<p>&lt;key&gt;apple.awt.graphics.UseQuartz&lt;&#47;key&gt;</p>
<p>&lt;string&gt;true&lt;&#47;string&gt;</p>
<p>and immediately after them, add the lines:</p>
<p>&lt;key&gt;google.api.key&lt;&#47;key&gt;</p>
<p>&lt;string&gt;XXXXXXXX&lt;&#47;string&gt;</p>
<p>where "XXXXXXXX" is your Google Translate API key.</p>
<p>3.9 Save Info.plist.</p>

<p><b>Users launching OmegaT from the command line or by a script:</b></p>

<p>3.10 Add the following argument to the launch command:</p>

<p>-Dgoogle.api.key=XXXXXXXX</p>

<p>where "XXXXXXXX" is your Google Translate API key.</p>

<p>The basic launch command with the Google Translate API added will therefore be:</p>

<p>java -jar -Dgoogle.api.key=XXXXXXXX OmegaT.jar</p>

<p>4. Configuration in OmegaT</p>
<p>4.1. Launch OmegaT</p>
<p>4.2. Select Options > Machine Translate</p>
<p>4.3. Check Google Translate v2 (leaving the other options unchecked)</p>

<p>5. Note:</p>

<p>5.1 Google Machine Translation is a paid service (US$20.00 per million
characters). You can check the daily usage from your Google account. In the upper menu:</p>
<p>More > Even More > Innovation/Code > APIs Console > Service/Translate API</p>


<p>Copyright Milan Hubacek and Marc Prior 2011</p>

</div>

<div id="footer"><a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=68187&amp;type=1" alt="SourceForge.net Logo" height="31" width="88" /></a><br />

<a href="http://validator.w3.org/check?uri=referer"><img src="../../images/xhtml.png" alt="Valid XHTML" /></a> <a href="http://jigsaw.w3.org/css-validator/check/referer"><img src="../../images/css.png" alt="Valid XHTML" /></a>
	</div>

</div>

</body></html>
